package example.com.zcq.mymj.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;

import example.com.zcq.mymj.R;
import example.com.zcq.mymj.ui.TopBar;

public class ContentActivity extends AppCompatActivity {

    private TopBar mTopbarTitle;
    /**
     * 我们这款软件
     */
    private TextView mTvContent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_content);
        initView();
        Intent intent=getIntent();
        String content = intent.getStringExtra("content");
        String title = intent.getStringExtra("title");
        if(content!=null){
            mTvContent.setText(content);
        }
        if(title!=null){
            mTopbarTitle.setCenterText(title);
        }
    }

    private void initView() {
        mTopbarTitle = (TopBar) findViewById(R.id.topbar_title);
        mTvContent = (TextView) findViewById(R.id.tv_content);
    }
}
